<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户点评</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="telephone=no" name="format-detection">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <script src="js/rem.js"></script>
    <link rel="stylesheet" href="css/mui.min.css" />
    <link rel="stylesheet" href="css/reset.css"/>
    <link rel="stylesheet" href="css/common.css" />
    <link rel="stylesheet" href="css/main.css"/>
    <link rel="stylesheet" href="css/iconfont.css"/>
    <link rel="stylesheet" href="css/yhdp.css" />
    <script src="js/jquery.min.js"></script>
</head>
<body id="weibi" class="bg1">
<header class="mui-bar mui-bar-nav">
	<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	<h1 class="mui-title">用户点评</h1>
</header>
    <section>
    <form action="" method="get"><table width="100%" border="0">
  <tr>
    <td><img alt="" src="image/mzl.ebxofkjk.png"></td>
  </tr>
  <tr>
  	<td class="font"><span class="teacher">赵师傅</span></td>
  </tr>
  <tr>
    <td><span><b class="score">0</b>分</span></td>
  </tr>
    <tr>
		<td>
			<div class="mui-content-padded">
				<div class="icons mui-inline">
					<i data-index="1" class="mui-icon mui-icon-star"></i>
					<i data-index="2" class="mui-icon mui-icon-star"></i>
					<i data-index="3" class="mui-icon mui-icon-star"></i>
					<i data-index="4" class="mui-icon mui-icon-star"></i>
					<i data-index="5" class="mui-icon mui-icon-star"></i>
				</div>
			</div>
		</td>
  </tr>
  <tr>
    <td><textarea name="" cols="" rows="4" placeholder="师傅人很不错"></textarea></td>
  </tr>
  <tr>
    <td> <a href="index.html"><button type="button" data-loading-icon="mui-spinner mui-spinner-custom" class="mui-btn mui-btn-primary">提交</button></a></td>
  </tr>
</table>
</form>
</section>


<script src="js/mui.min.js"></script>
<script src="js/html/common.js"></script>
<script src="js/fastclick.js"></script>

<!--<script src="js/html/weibi.js"></script>-->
<script>
	mui.init();
	$(function() {
  		FastClick.attach(document.body);
	});
	
 	mui('.icons').on('tap','i',function(){
	  	var index = parseInt(this.getAttribute("data-index"));
	  	var parent = this.parentNode;
	  	var children = parent.children;
	  	var score = document.getElementsByClassName("score")[0];
	  	if(this.classList.contains("mui-icon-star")){
	  		for(var i=0;i<index;i++){
  				children[i].classList.remove('mui-icon-star');
  				children[i].classList.add('mui-icon-star-filled');
	  		}
	  	}else{
	  		for (var i = index; i < 5; i++) {
	  			children[i].classList.add('mui-icon-star')
	  			children[i].classList.remove('mui-icon-star-filled')
	  		}
	  	}
	  	starIndex = index;
	  	score.innerText = index*2;
  	});
</script>

</body>
</html>
